Skip to content

gh-144424: Clean up dead weakrefs to sqlite3 Blob objects#144435

Open
takluyver wants to merge 3 commits intopython:mainfrom
takluyver:sqlite-cleanup-blob-weakrefs
Open

gh-144424: Clean up dead weakrefs to sqlite3 Blob objects#144435
takluyver wants to merge 3 commits intopython:mainfrom
takluyver:sqlite-cleanup-blob-weakrefs

Conversation

@takluyver
Copy link
Contributor

@takluyver takluyver commented Feb 3, 2026

Using conn.blobopen() puts a weakref to the new blob object into a list, but dead weakrefs are never cleaned up.

This adds a check to go through and clean up dead weakrefs on every 200th blob opened, closely based on the code I removed in #144378 doing the same thing for Cursor weakrefs.

Closes #144424.

takluyver and others added 2 commits February 5, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite3 Blob objects leave behind weakrefs which are never cleaned up

2 participants